<!-- 编辑区域 -->
<div class="lists">
    <div class="c-head-box">
        <form method="get" action="{:Url('announcement_list')}">
            <ul>
                <li class="c-head-search">
                    <!-- 搜索条件 -->
                    <ul>
                        <li><span>公告标题：</span><input type="text" name="announcement_title" value="{$announcement_title}"/></li>
                        <li><span>公告内容：</span><input type="text" name="announcement_content" value="{$announcement_content}"/></li>
                    </ul>
                </li>
                <li class="c-head-button">
                    <!-- 操作按钮 -->
                    <div class="fr"><input type="submit" class="but_blue" value="搜索"></div>
                    <div class="fr"><a class="but_blue" href="{:Url('announcement_add')}">添加公告</a></div>
                </li>
            </ul>
        </form>
    </div>

    <!--用户列表-->
    <div class="lists-tab-cont">
        <div class="lists-table">
            <table class="pointer" cellpadding="0" cellspacing="0" border="0">
                <thead>
                    <tr>
                        <th style="width: 5%" class="tabSort-header"><a class="tabSort-header-inner"><p>编号</p></a></th>
                        <th style="width: 8%" class="tabSort-header"><a class="tabSort-header-inner"><p>APP类型</p></a></th>
                        <th style="width: 50px;" class="tabSort-header"><a class="tabSort-header-inner"><p>图片</p></a></th>
                        <th style="width: 12%;" class="tabSort-header"><a class="tabSort-header-inner"><p>标题</p></a></th>
                        <th style="width: 15%;" class="tabSort-header"><a class="tabSort-header-inner"><p>内容</p></a></th>
                        <th style="width: 15%;" class="tabSort-header"><a class="tabSort-header-inner"><p>链接地址</p></a></th>
                        <th style="width: 5%;" class="tabSort-header"><a class="tabSort-header-inner"><p>状态</p></a></th>
                        <th style="width: 10%;" class="tabSort-header"><a class="tabSort-header-inner"><p>创建时间</p></a></th>
                        <th class="tabSort-header"><a class="tabSort-header-inner"><p>操作</p></a></th>
                    </tr>
                </thead>
                <tbody>
                {foreach name="announcement_list" item="info"}
                    <tr>
                        <td title="{$info.announcement_id}">{$info.announcement_id}</td>
                        <td>{:widget('common/Color/color',array('app_type',$info['app_type']))}</td>
                        <td>{:widget('common/Images/img',array($info['announcement_photo']))}</td>
                        <td title="{$info.announcement_title}">{$info.announcement_title}</td>
                        <td title="{$info.announcement_content}">{$info.announcement_content}</td>
                        <td title="{$info.announcement_url}">{$info.announcement_url}</td>
                        <td>{:widget('common/Color/color',array('is_delete',$info['is_delete']))}</td>
                        <td title="{$info.create_time}">{$info.create_time}</td>
                        <td>
                            <a href="{:Url('announcement_info',array('announcement_id'=>$info['announcement_id']))}" class="blue">详情</a>
                            <a href="{:Url('announcement_edit',array('announcement_id'=>$info['announcement_id']))}" class="blue">编辑</a>
                            {switch name="info.is_delete"}
                            {case value="1"}<a href="{:Url('announcement_del',array('announcement_id'=>$info['announcement_id']))}" class="blue info1">删除</a>{/case}
                            {case value="2"}<a href="{:Url('announcement_reset',array('announcement_id'=>$info['announcement_id']))}" class="blue info2"><font color="red">还原</font></a>{/case}
                            {/switch}
                        </td>
                    </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
    </div>

    <!-- 翻页模板 -->
    <div class="page">
        {$Think.config.page_html}
    </div>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("a.info1").click(function(){
            if(confirm("您确定要删除该公告吗？")){
                return true;
            }else{
                return false;
            }
        });

        //提示信息
        $("a.info2").click(function(){
            if(confirm("您确定要还原该公告吗？")){
                return true;
            }else{
                return false;
            }
        });
    });
</script>
